package com.feng.mvc.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class ViewController {
    @RequestMapping("/testThymeleaf")
    public String testThymeleaf(){
        System.out.println("欢迎执行/testThymeleaf请求");
        return "view";
    }

    @RequestMapping("/testForward")
    public String testForward(){
        //将直接转发到 /testThymeleaf请求执行视图解析器
        return "forward:/testThymeleaf";
    }

    @RequestMapping("/tesRedirect")
    public String tesRedirect(){
        return "redirect:/testThymeleaf";
    }
}
